<?php
/**
 * Created by PhpStorm.
 * User: xuke
 * Date: 16/5/20
 * Time: 下午2:18
 */
namespace App\Http\Model;
use Illuminate\Database\Eloquent\Model;
class Base extends Model
{
    protected $connection = 'mysql';

    public function __construct(array $attributes=[])
    {
        parent::__construct($attributes);
        $this->setDefault();
    }

    /**设置数据库连接配置
     * @param $connection
     * @return $this
     */
    public function changeConnection($connection)
    {
        $this->connection = $connection;
        return $this;
    }

    public function setDefault()
    {
        return $this;
    }
}